<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>zui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <script src="js/jquery-2.2.3.min.js"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
    <link href="css/zui.min.css" rel="stylesheet">
    <script src="js/zui.min.js"></script>


    <link href="lib/datagrid/zui.datagrid.min.css" rel="stylesheet">
    <script src="lib/datagrid/zui.datagrid.min.js"></script>

    <!-- ZUI 标准版压缩后的 CSS 文件 -->
<!--    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/zui/1.9.2/css/zui.min.css">-->

<!--    &lt;!&ndash; ZUI Javascript 依赖 jQuery &ndash;&gt;-->
<!--    <script src="//cdnjs.cloudflare.com/ajax/libs/zui/1.9.2/lib/jquery/jquery.js"></script>-->
<!--    &lt;!&ndash; ZUI 标准版压缩后的 JavaScript 文件 &ndash;&gt;-->
<!--    <script src="//cdnjs.cloudflare.com/ajax/libs/zui/1.9.2/js/zui.min.js"></script>-->
</head>
<body>
<button class="btn btn-primary" type="button">主要按钮</button>
<!--<table class="layui-hide" id="myDataGrid"></table>-->
<table class="layui-hide" id="myDataGrid"></table>
<script>
    // $.ajax({
    //     // url:'http://192.168.0.104:8005/test/get/data',
    //     url:'http://127.0.0.1:8005/test/get/data',
    //     type: "GET",
    //     dataType: 'json',
    //     success: function (res) {
    //         // window.alert('===' + JSON.stringify(res))
    //         renderInfo(res.data)
    //     }
    // });
    renderInfo()
    function renderInfo(data) {
        console.log('====' + JSON.stringify(data))
        $('#myDataGrid').datagrid({
            height: 184,
            dataSource: {
                cols:[
                    {name: 'time', label: '对局时间', width: 132},
                    {name: 'hero', label: '英雄', width: 134},
                    {name: 'action', label: '动作', width: 109},
                    {name: 'target', label: '目标', width: 109},
                    {name: 'desc', label: '描述', width: 'auto'}
                ],
                array:[
                    {time: '00:11:12', hero:'幻影刺客', action: '击杀', target: '斧王', desc: '幻影刺客击杀了斧王。'},
                    {time: '00:13:22', hero:'幻影刺客', action: '购买了', target: '隐刀', desc: '幻影刺客购买了隐刀。'},
                    {time: '00:19:36', hero:'斧王', action: '购买了', target: '黑皇杖', desc: '斧王购买了黑皇杖。'},
                    {time: '00:21:43', hero:'力丸', action: '购买了', target: '隐刀', desc: '力丸购买了隐刀。'},
                    {time: '00:11:12', hero:'幻影刺客', action: '击杀', target: '斧王', desc: '幻影刺客击杀了斧王。'},
                    {time: '00:13:22', hero:'幻影刺客', action: '购买了', target: '隐刀', desc: '幻影刺客购买了隐刀。'},
                    {time: '00:19:36', hero:'斧王', action: '购买了', target: '黑皇杖', desc: '斧王购买了黑皇杖。'},
                    {time: '00:21:43', hero:'力丸', action: '购买了', target: '隐刀', desc: '力丸购买了隐刀。'}
                ]
            },
        });
    }
</script>
</body>
</html>
